<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

    <title th:text="#{screen.pm.reset.title}">Reset Password Send Instructions View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
</head>

<body>
    <main role="main" class="container mt-3 mb-3">
        <div layout:fragment="content" id="reset">
            <div class="row">
                <div class="col-lg-6 offset-lg-3">
                    <div class="mdc-card card">
                        <form method="post" id="fm1" class="d-block card-body">
                            <section class="p-4">
                                <h3 th:utext="#{screen.pm.reset.title}">Reset your password</h3>
                                <p th:utext="#{screen.pm.reset.instructions}">Please provide your username. You will
                                    receive a notification with follow-up
                                    instructions on how to reset your password.</p>
                                <div class="alert alert-danger banner banner-danger alert alert-danger banner-dismissible mb-4"
                                    th:if="${flowRequestContext.messageContext.hasErrorMessages()}">
                                    <p th:each="message,i : ${flowRequestContext.messageContext.allMessages}"
                                        th:utext="${message.text}" th:classappend="${i.last} ? 'm-0'">
                                        Message Text
                                    </p>
                                </div>

                                <span th:if="${recaptchaPasswordManagementEnabled}">
                                    <div th:replace="~{fragments/recaptcha :: recaptchaToken}" />
                                </span>

                                <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
                                <input type="hidden" name="_eventId" value="findAccount" />
                                <div class="d-flex">

                                    <label for="username" class="mdc-text-field mdc-text-field--outlined control-label">
                                        <span class="mdc-notched-outline">
                                            <span class="mdc-notched-outline__leading"></span>
                                            <span class="mdc-notched-outline__notch">
                                                <span class="mdc-floating-label" th:utext="#{screen.pm.reset.username}">Username</span>
                                            </span>
                                            <span class="mdc-notched-outline__trailing"></span>
                                        </span>
                                        <input class="mdc-text-field__input form-control"
                                               type="text"
                                               name="username"
                                               id="username"
                                               size="45"
                                               autocapitalize="none"
                                               spellcheck="false"
                                               autocomplete="username" required />
                                    </label>

                                </div>
                            </section>
                            <div class="mdc-card__actions_actions p-4 d-flex">
                                <div th:replace="~{fragments/submitbutton :: submitButton (messageKey='screen.pm.button.submit')}" />
                                &nbsp;
                                <button class="mdc-button mdc-button--outline btn btn-outline-secondary mdc-card__actions_action mdc-card__actions_action--button" name="cancel"
                                    accesskey="c" th:attr="data-processing-text=#{screen.welcome.button.loginwip}"
                                    type="button" onclick="location.href = location.href;" value="CANCEL"
                                    th:value="#{screen.pm.button.cancel}">
                                    <span class="mdc-button__label" th:text="#{screen.pm.button.cancel}">CANCEL</span>
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </main>
</body>

</html>
